package com.baidu.Chapter02;

import java.util.Scanner;

public class ex2_15 {
    public static void main(String[] args) {
        System.out.print("Enter x1 and y1：");
        Scanner sc=new Scanner(System.in);
        double x1= sc.nextDouble();
        double y1= sc.nextDouble();
        System.out.print("Enter x2 and y2：");
        double x2= sc.nextDouble();
        double y2= sc.nextDouble();
        System.out.println("The distance between the two points is "+ Math.sqrt( Math.pow(x2-x1,2) + Math.pow(y2-y1,2) ));
    }
}
